package ControlLayer;
import ModelLayer.*;
import java.util.ArrayList;
//model layer package has to be imported
/**
 * Controller class for the DVD collection
 * 
 * @author (kbh) 
 * @version (2005.03.31)
 * @revised version English (Ab)
 * (FEN): 2006.03.21: Some changes to the architecture in order to assure layering
 *                    and loose coupling
 */
public class DVDCtr
{
    //declare instance variables to reference containers
    //passed as arguments from the main class

    /**
     * Constructor for objects of class DVDCtr
     */
    public DVDCtr()//DVD container is to be passed as parameter from the main controller
    {
        
    }
    
    //Dummy implementation: after implementing the model layer 
    //objects of class DVD are to be returned, not String
    public DVD findDVD(long id)
    {
      return DVDRegister.getInstance().findDVD(id); 
    }
    
    public void printDVD(long id)
    {
        DVDRegister.getInstance().printDVD(id);
    }
    
    //Dummy implementation: more parameters are probaly to added
    public boolean createDVD(long id,String title,String artist,String publicationDate)
    {    
        return   DVDRegister.getInstance().createDVD(id,title,artist,publicationDate);
    }
    
    public void deleteDVD(long id)
    {
        
       DVDRegister.getInstance().removeDVD(id);
       
    }
    
    public void createCopy(long id,String serialNumber,String purchaseDate,double purchasePrice)
    {
        DVDRegister.getInstance().createCopy(id,serialNumber,purchaseDate,purchasePrice);
    }
    
    
    public void listAllDvds()
    {
      DVDRegister.getInstance().listAllDVDs();
    }
    
    public void listAllCopies(long id)
    {
        DVDRegister.getInstance().listAllCopies(id);
    }
    
}
